package cn.alm.interceptordemo.controller;

import cn.alm.interceptordemo.common.CommonDto;
import cn.alm.interceptordemo.common.CommonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class HelloController {

    @PostMapping("hello")
    public CommonResult hello(@RequestBody CommonDto dto) {
        CommonResult cr = new CommonResult();
        cr.setSuccess(true);
        cr.setMessage("Hello");
        return cr;
    }

}
